<script setup lang="ts">
defineProps<{
  leftText: string
  name: string
  onClickRight: () => void
  onClickLeft: () => void
}>()
</script>

<template>
  <van-nav-bar @click-right="onClickRight" @click-left="onClickLeft">
    <template #left>
      <div class="icon">
        <ic-icon :name="name" />
      </div>
      <div class="text">{{ leftText }}</div>
    </template>
    <template #right>
      <van-icon name="arrow" size="16" />
    </template>
  </van-nav-bar>
</template>

<style lang="scss" scoped>
::v-deep(.van-icon) {
  color: var(--ic-color4);
}
:deep() {
  .van-nav-bar {
    &__content {
      height: 52px;
    }
    &__right {
      padding-right: 12px;
    }
  }
}
.icon {
  width: 20px;
  height: 20px;
}
.text {
  margin-left: 12px;
  font-size: 16px;
  letter-spacing: 0;
}
</style>
